<?php
namespace app\manage\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class Couponlist extends Validate
{
    //定义验证规则
    protected $rule = [
        'name|分类名称'  => 'require',
        'order|排序'=>'number|between:1,99'
    ];

    //定义验证提示
    protected $message = [
        'name.require' => '请输入分类名称',
        'order.number'=>'排序数值请填写1-99之间'
    ];

    //定义验证场景
    protected $scene = [
        'add'=>['name','values','order'],
        'update'  =>  ['name','values','order'],//更新
    ];
}
